from langchain.agents import initialize_agent
from langchain.agents import load_tools
from langchain.agents import AgentType
from langchain_community.llms import Tongyi
from dotenv import find_dotenv, load_dotenv

load_dotenv(find_dotenv())

llm = Tongyi()
tools = load_tools(["llm-math"], llm)
agent = initialize_agent(tools, llm, AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION, verbose=True)

print(llm.invoke("26的3.5次方是多少?"))
print('-----------------------------------------')
print(agent.invoke("26的3.5次方是多少？"))